/**
 * Created by IntelliJ IDEA.
 * User: 12
 * Date: 12-5-3
 * Time: 上午9:29
 * To change this template use File | Settings | File Templates.
 */
$(function(){
    $('#task_tb').datagrid({
        title:'任务列表',
        singleSelect:true,
        idField:'device.id',
        pagination:true,
        columns:[[
            {field:'name',title:'光交箱名称/编码',width:100},
            {field:'addr',title:'所在位置',width:100},
            {field:'opt',title:'操作',width:100,align:'center',
                formatter:function(value,rec){
                    return '<span class="task_show_detail" style="color:red">查看详情</span>';
                }
            }
        ]],
        onBeforeLoad:function(){
            $(this).datagrid('rejectChanges');
        },
        onClickRow:function(rowIndex,rowData) {
            $('#btnedit').linkbutton('enable');
            $('#btnremove').linkbutton('enable');

        },
        rownumbers:true
    });

})

